### switch does not permit hold cal to not ready DN and busy queue, hold retrieve 16,17, 19, 20

def hold_retrieve_1():
  """HF1. DN1 call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_2():
  """HF2. Inbound call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_3():
  """HF3  Outbound call DN3 to ExtDN, DN3 cinit DN1, DN2 answer, rel. DN3, DN3 retrieve, rel.ExtDn"""
  AilAg3.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg3.InitiateConference(DN1)
  AilAg1.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg2.ReleaseCall()

def hold_retrieve_4():
  """HF4. DN1 call to DN3, DN3 cinit ExtDN , ExtDN answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_5():
  """HF5. Inbound call to DN3, DN3 cinit ExtDN, ExtDN answer, rel. DN3, DN3 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_6():
  """HF6. DN1 call to DN3, DN3 cinit DN2 (no answer), DN3 retrieve, rel. DN1"""
  AilAg2.SetNotReady()
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()
  AilAg2.SetReady()
  
def hold_retrieve_7():
  """HF7. Inbound call to DN3,  DN3 cinit DN2 (no answer), rel DN3, DN3 retrieve, rel.ExtDn"""
  AilAg2.SetNotReady()
  Ext1AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg1.ReleaseCall()
  AilAg2.SetReady()
  
def hold_retrieve_8():
  """HF8. Outbound call DN3 to ExtDN, DN3 cinit DN1 (no answer),rel DN3, DN3 retrieve, rel.ExtDn"""
  AilAg1.SetNotReady()
  AilAg3.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg3.InitiateConference(DN1)
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg2.ReleaseCall()
  AilAg1.SetReady()
  
def hold_retrieve_9():
  """HF9. DN1 call to DN3, DN3 cinit ExtDN (no answer),rel DN3, DN3 retrieve, rel. DN1"""

  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(Ext1DN2)
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()

  
def hold_retrieve_10():
  """HF10. Inbound call to DN3,DN3 cinit ExtDN (no answer),rel DN3, DN3 retrieve, rel.ExtDn"""

  Ext1AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(Ext1DN2)
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

  
def hold_retrieve_11():
  """HF11. DN1 call to ACD3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()

def hold_retrieve_12():
  """HF12. Inbound call to ACD3, DN3 cinit DN2, DN2 ans, rel. DN3, DN3 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_13():
  """HF13. DN1 call to ACD3,  DN3 cinit ExtDN, ExtDN ans, rel. DN3, DN3 retrieve, rel. DN1"""
 
  AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(Ext1DN2)
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()

  
def hold_retrieve_14():
  """HF14. Inbound call to ACD3,DN3 cinit ExtDN, ExtDN ans,rel. DN3, DN3 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg3.ReleaseCall()
  AilAg3.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_15():
  """H1. DN1 call to DN3, DN3 ans, DN3 hold, DN3 retrieve, rel. DN3"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.HoldCall()
  AilAg3.RetrieveCall()
  AilAg3.ReleaseCall()


def hold_retrieve_18():
  """H6. DN1 call to ACD3, DN3 ans, DN3 hold, DN3 retrieve, rel. DN1"""
  
  AilAg1.MakeCall(ACD3)
  AilAg3.AnswerCall()
  AilAg3.HoldCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()
  
  

def hold_retrieve_21():
  """H11. Inbound call to DN2,  DN2 hold, DN2 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(DN2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_22():
  """H12. Outbound call DN2 to ExtDN,  DN2 hold, DN2 retrieve, rel.ExtDn"""
  AilAg2.MakeCall(Ext1DN2)
  Ext1AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.RetrieveCall()
  Ext1AilAg2.ReleaseCall()

def hold_retrieve_23():
  """H13. Inbound call to ACD2, DN2 hold, DN2 retrieve, rel.ExtDn"""
  Ext1AilAg1.MakeCall(ACD2)
  AilAg2.AnswerCall()
  AilAg2.HoldCall()
  AilAg2.RetrieveCall()
  Ext1AilAg1.ReleaseCall()

def hold_retrieve_conf_1():
  """HF1. DN1 call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.CompleteConference()
  AilAg3.HoldCall()
  AilAg1.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg2.ReleaseCall()



def hold_retrieve_conf_2():
  """HF1. DN1 call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.CompleteConference()
  AilAg1.ReleaseCall()
  AilAg3.HoldCall()
  AilAg3.RetrieveCall()
  AilAg2.ReleaseCall()
  

def hold_retrieve_conf_3():
  """HF1. DN1 call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.CompleteConference()
  AilAg3.HoldCall()
  AilAg2.ReleaseCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()


def hold_retrieve_conf_4():
  """HF1. DN1 call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
  AilAg1.MakeCall(DN3)
  AilAg3.AnswerCall()
  AilAg3.InitiateConference(DN2)
  AilAg2.AnswerCall()
  AilAg3.CompleteConference()
  AilAg2.ReleaseCall()
  AilAg3.HoldCall()
  AilAg3.RetrieveCall()
  AilAg1.ReleaseCall()
  
def hold_retrieve_conf_5():
    """HF1. DN1 call to DN3, DN3 cinit DN2, DN2 answer, rel. DN3, DN3 retrieve, rel. DN1"""
    AilAg1.MakeCall(DN3)
    AilAg3.AnswerCall()
    AilAg3.InitiateConference(DN2)
    AilAg2.AnswerCall()
    AilAg3.CompleteConference()
    AilAg3.HoldCall()
    AilAg3.RetrieveCall()
    AilAg1.ReleaseCall()
    AilAg2.ReleaseCall()
  
